import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';

export const columns: BasicColumn[] = [
    {
    title: '设备topic',
    dataIndex: 'topic'
   },
   {
    title: '设备昵称',
    dataIndex: 'deviceNickName'
   },
   {
     title: '状态值',
     dataIndex: 'statusValue'
   },
   {
    title: '设备描述',
    dataIndex: 'deviceDesc'
   },
   {
    title: '设备分组',
    dataIndex: 'deviceGroup'
   },
];

export const searchFormSchema: FormSchema[] = [
 {
    label: '设备topic',
    field: 'topic',
    component: 'Input'
  },
 {
    label: '设备昵称',
    field: 'deviceNickName',
    component: 'Input'
  },
];

export const formSchema: FormSchema[] = [
  // TODO 主键隐藏字段，目前写死为ID
  {label: '', field: 'id', component: 'Input', show: false},
  {
    label: '设备topic',
    field: 'topic',
    component: 'Input',
  },
  {
    label: '设备昵称',
    field: 'deviceNickName',
    component: 'Input',
  },
  {
    label: '设备描述',
    field: 'deviceDesc',
    component: 'Input',
  },
  {
    label: '设备分组',
    field: 'deviceGroup',
    component: 'Input',
  },
];
